package com.dkm.dkmproject.service.impl;


import com.dkm.dkmproject.dao.ServicetypeTbMapper;
import com.dkm.dkmproject.domain.ServicetypeTb;
import com.dkm.dkmproject.service.IServicetypeTbService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务类型表 服务实现类
 * </p>
 *
 * @author 周佳佳
 * @since 2020-04-26
 */
@Service
public class ServicetypeTbServiceImpl extends ServiceImpl<ServicetypeTbMapper, ServicetypeTb> implements IServicetypeTbService {

    @Autowired
    private ServicetypeTbMapper servicetypeTbMapper;
    @Autowired
    IServicetypeTbService servicetypeTbService;

    @Override
    public int deleteByPrimaryKey(Integer syId) {
        return servicetypeTbMapper.deleteByPrimaryKey(syId);
    }

    @Override
    public int insertSelective(ServicetypeTb record) {
        return servicetypeTbMapper.insertSelective(record);
    }

    @Override
    public ServicetypeTb selectByPrimaryKey(Integer syId) {
        return servicetypeTbMapper.selectByPrimaryKey(syId);
    }

    @Override
    public List<ServicetypeTb> selectAll() {
        return servicetypeTbMapper.selectAll();
    }

    @Override
    public int updateByPrimaryKeySelective(ServicetypeTb record) {
        return servicetypeTbMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(ServicetypeTb record) {
        return servicetypeTbMapper.updateByPrimaryKey(record);
    }


    @Override
    public List<ServicetypeTb> selectAllOne(String syName) {
        return servicetypeTbMapper.selectAllTwo(syName);
    }




    @Override
    public List<ServicetypeTb> selectAllTwo(Integer pageNum, Integer pageSize,String syName) {
        PageHelper.startPage(pageNum,pageSize);
        return servicetypeTbService.selectAllOne(syName);
    }

    @Override
    public int selectCountOne(String syName) {
        return servicetypeTbMapper.selectCountOne(syName);
    }
}
